package ${package.Api};

import org.springframework.stereotype.Service;
import ${package.IApi}.I${entity}Api;
import ${package.Iservice}.I${entity}Service;
import javax.annotation.Resource;
import com.dtyunxi.rest.RestResponse;
import ${package.Requestdto}.${entity}ReqDto;
import ${package.Responsedto}.${entity}RespDto;

/**
* ${table.comment}服务实现类
*
* @author ${author}
* @since ${date}
*/
@Service
public class ${entity}ApiImpl implements I${entity}Api {

    @Resource
    private I${entity}Service ${entity?uncap_first}Service;

    @Override
    public RestResponse<Long> add${entity}(${entity}ReqDto addReqDto) {
        return new RestResponse(${entity?uncap_first}Service.add${entity}(addReqDto));
    }

    @Override
    public RestResponse<Void> modify${entity}(${entity}ReqDto modifyReqDto) {
        ${entity?uncap_first}Service.modify${entity}(modifyReqDto);
        return RestResponse.VOID;
    }

    @Override
    public RestResponse<Void> remove${entity}(String ids,
                                                 Long instanceId) {
        ${entity?uncap_first}Service.remove${entity}(ids, instanceId);
        return RestResponse.VOID;
    }
}
